var gulp = require("gulp");
var nodemon = require("gulp-nodemon");
var mocha = require('gulp-mocha');

//gulp.task('watch', function () {
//    gulp.watch(['./views/**/*.*','./public/**/*.js','./models/**/*.js','./schemas/**/*.js'], ['reload-client'])
//})

gulp.task('start', function () {
    nodemon({
        script: 'app.js',
        ext: 'js',
        ignore: ['README.md', 'node_modules/**'],
        watch: ["./"]
    })
});

gulp.task('mocha', function () {
    return gulp.src('test/**/*.js', {read: false})
        .pipe(mocha({reporter: 'spec'}));
});

gulp.task("default", ['start'], function () {

});
gulp.task("test", ['mocha'], function () {

});